using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Weight.Base;

namespace  RFCard
{
   public  interface ICard
    {
        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        ResultEntity Init();
        /// <summary>
        /// 打开设备
        /// </summary>
        ResultEntity Open(OpenEntity entity);

        /// <summary>
        /// 关闭设备
        /// </summary>
        ResultEntity Close();

        /// <summary>
        /// 获取卡号(身份证除了可以获取号码外，还可以货物名称、地址信息)
        /// </summary>
        /// <returns></returns>
        ResultEntity<ResultValEntity> GetCardNo();

        /// <summary>
        /// 读卡
        /// </summary>
        /// <returns></returns>
        ResultEntity<ResultValEntity> Read(ReadParamEntity entity);

        /// <summary>
        /// 写卡
        /// </summary>
        /// <returns></returns>
        ResultEntity Write(WriteParamEntity entity);

        /// <summary>
        /// 清卡
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        ResultEntity Clear(ClearParamEntity entity);

        /// <summary>
        /// 获取设备信息
        /// </summary>
        /// <returns></returns>
        ResultEntity GetDeviceInfo();

        /// <summary>
        /// 设置对比的卡号集合
        /// </summary>
        /// <param name="cardNos"></param>
        void SetComparison(List<string> cardNos);

    }
}


